#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int tmp = 0;
	int Sn = 0;
	int a = 0;
	int i = 0;
	int n = 0;
	scanf("%d %d", &a,&n);
	for (i = 0; i < n; i++)
	{
	    tmp = tmp * 10 + a;
		Sn = Sn + tmp;
	}
	printf("%d", Sn);
	return 0;
}